Toolbar.controlEnable Method
Syntax
Arguments
- index
Index specifies which button on the toolbar that is set. An Index value of 1 specifies the first button on the toolbar.
- flag
.T. = Enable the button, .F. = Disable the button
Description
Enables or disables a button on a toolbar.
Discussion
The <toolbar>.controlEnable() method sets that status of a button on a toolbar to either enabled or disabled. The toolbar is specified by the object pointer, <toolbar>.
If you want to control the state of buttons on system toolbars (i.e. toolbars that are opened automatically by a Form, Browse, Print Preview window), then you must first get a pointer to the system toolbar before you can use this method. Use the Toolbar::get() function to get a pointer to a toolbar whose name you know.
Example
dim tbar as P tbar = toolbar::open("My Own Toolbar") tbar.controlenable(3, .T.) 'The following disables the 3 rd control on the default toolbar in 'Form View '----------------------------------------------------------------- tbar = toolbar::get("Form View") tbar.controlenable(3,.f.)
Limitations
Desktop applications only.
See Also